package com.mpush.api.push;

import com.mpush.api.protocol.PushType;

/**
 * 推送内容
 * <p>
 * 该类用于定义推送的内容，通过jsons序列化后填充到PushMsg类的content属性。通过该类实现不同类型消息的推送
 * </p>
 * 
 * @author gary.zhi
 * @date Jul 19, 2018 3:11:00 PM
 */
public class PushContent {

	/**
	 * 消息类型
	 */
	private byte type;

	/**
	 * 实际的消息，通常是被序列化后的字符串
	 */
	private String content;

	public PushContent(byte type, String content) {
		this.type = type;
		this.content = content;
	}

	public PushContent(PushType pushType, String content) {
		this(pushType.cmd, content);
	}

	public byte getType() {
		return type;
	}

	public void setType(byte type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}
